package cn.maihe.elg.operation.service.business;

import cn.maihe.elg.operation.repository.entity.KtCustomerDO;
import cn.maihe.elg.operation.repository.entity.KtCustomerDOCondition;
import cn.maihe.elg.operation.service.BaseDaoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Description
 * @Author caixh
 * @Date 2022/8/9.
 */
@Service
@Slf4j
public class KtCustomerService extends BaseDaoService<KtCustomerDO> {
    /**
     *
     * @param bidderId
     * @param certType 1=企业证书 2个人证书
     * @return
     */
    public KtCustomerDO selectByBidderId(Long bidderId,String certType) {
        return this.selectOne(KtCustomerDOCondition.builder().andBidderIdEq(bidderId).andCertTypeEq(certType).build());
    }
    /**
     *
     * @param orgId
     * @param certType 1=企业证书 2个人证书
     * @return
     */
    public KtCustomerDO selectByOrgId(Long orgId,String certType) {
        return this.selectOne(KtCustomerDOCondition.builder().andOrgIdEq(orgId).andCertTypeEq(certType).build());
    }
}
